3.2424 \(\int \frac{1}{x \sqrt{a^2-2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=71 \[ \frac{\log (x) (a-b x)}{a \sqrt{a^2-2 a b x+b^2 x^2}}-\frac{(a-b x) \log (a-b x)}{a \sqrt{a^2-2 a b x+b^2 x^2}} \]

[Out]

((a - b*x)*Log[x])/(a*Sqrt[a^2 - 2*a*b*x + b^2*x^2]) - ((a - b*x)*Log[a - b*x])/(a*Sqrt[a^2 - 2*a*b*x + b^2*x^
2])

________________________________________________________________________________________

Rubi [A]  time = 0.0241426, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {646, 36, 29, 31} \[ \frac{\log (x) (a-b x)}{a \sqrt{a^2-2 a b x+b^2 x^2}}-\frac{(a-b x) \log (a-b x)}{a \sqrt{a^2-2 a b x+b^2 x^2}} \]

Antiderivative was successfully verified.

[In]

Int[1/(x*Sqrt[a^2 - 2*a*b*x + b^2*x^2]),x]

[Out]

((a - b*x)*Log[x])/(a*Sqrt[a^2 - 2*a*b*x + b^2*x^2]) - ((a - b*x)*Log[a - b*x])/(a*Sqrt[a^2 - 2*a*b*x + b^2*x^
2])

Rule 646

Int[((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[(a + b*x + c*x^2)^Fra
cPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b,
 c, d, e, m, p}, x] && EqQ[b^2 - 4*a*c, 0] &&  !IntegerQ[p] && NeQ[2*c*d - b*e, 0]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{1}{x \sqrt{a^2-2 a b x+b^2 x^2}} \, dx &=\frac{\left (-a b+b^2 x\right ) \int \frac{1}{x \left (-a b+b^2 x\right )} \, dx}{\sqrt{a^2-2 a b x+b^2 x^2}}\\ &=-\frac{\left (-a b+b^2 x\right ) \int \frac{1}{x} \, dx}{a b \sqrt{a^2-2 a b x+b^2 x^2}}+\frac{\left (b \left (-a b+b^2 x\right )\right ) \int \frac{1}{-a b+b^2 x} \, dx}{a \sqrt{a^2-2 a b x+b^2 x^2}}\\ &=\frac{(a-b x) \log (x)}{a \sqrt{a^2-2 a b x+b^2 x^2}}-\frac{(a-b x) \log (a-b x)}{a \sqrt{a^2-2 a b x+b^2 x^2}}\\ \end{align*}

Mathematica [A]  time = 0.0186234, size = 34, normalized size = 0.48 \[ \frac{(a-b x) (\log (x)-\log (a-b x))}{a \sqrt{(a-b x)^2}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/(x*Sqrt[a^2 - 2*a*b*x + b^2*x^2]),x]

[Out]

((a - b*x)*(Log[x] - Log[a - b*x]))/(a*Sqrt[(a - b*x)^2])

________________________________________________________________________________________

Maple [A]  time = 0.238, size = 37, normalized size = 0.5 \begin{align*} -{\frac{ \left ( bx-a \right ) \left ( \ln \left ( x \right ) -\ln \left ( bx-a \right ) \right ) }{a}{\frac{1}{\sqrt{ \left ( bx-a \right ) ^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x/((b*x-a)^2)^(1/2),x)

[Out]

-(b*x-a)*(ln(x)-ln(b*x-a))/((b*x-a)^2)^(1/2)/a

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/((b*x-a)^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.08486, size = 36, normalized size = 0.51 \begin{align*} \frac{\log \left (b x - a\right ) - \log \left (x\right )}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/((b*x-a)^2)^(1/2),x, algorithm="fricas")

[Out]

(log(b*x - a) - log(x))/a

________________________________________________________________________________________

Sympy [A]  time = 0.174644, size = 10, normalized size = 0.14 \begin{align*} \frac{- \log{\left (x \right )} + \log{\left (- \frac{a}{b} + x \right )}}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/((b*x-a)**2)**(1/2),x)

[Out]

(-log(x) + log(-a/b + x))/a

________________________________________________________________________________________

Giac [A]  time = 1.08825, size = 42, normalized size = 0.59 \begin{align*}{\left (\frac{\log \left ({\left | b x - a \right |}\right )}{a} - \frac{\log \left ({\left | x \right |}\right )}{a}\right )} \mathrm{sgn}\left (b x - a\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x/((b*x-a)^2)^(1/2),x, algorithm="giac")

[Out]

(log(abs(b*x - a))/a - log(abs(x))/a)*sgn(b*x - a)